package com.wanmait.mpdemo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author wanmait
 * @since 2022-01-14
 */
@Data
@Accessors(chain = true)
public class Question {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //使用例子对象的非空属性作为查询条件时，默认按着=如果使用like需要通过condition来指定
    @TableField(condition = SqlCondition.LIKE)
    private String title;

    private Integer questionTypeId;
    @TableField(exist = false)
    private QuestionType questionType;
    private Integer userinfoId;
    @TableField(exist = false)
    private Userinfo userinfo;
    private String info;

    private String description;

    private Boolean hasPic;

    private String pic;

    private Boolean hot;

    private Boolean top;

    //@TableField(condition = "%s&lt;#{%s}")
    private Integer hitCount;

    private Integer commentCount;

    private Integer praiseCount;

    private LocalDateTime lastCommentTime;

    private LocalDateTime inputTime;

    private LocalDateTime updateTime;

    private Boolean close;

    @TableLogic
    private Boolean enable;


}
